<?php


namespace app\common\model;


class User extends BaseModel
{
    public static function getByPhone($phone){
        $user=self::where('phone',$phone)
            ->find();
        return $user;
    }
    public static function getByOpenID($openid){
        $user=self::where('openid',$openid)
            ->find();
        return $user;
    }
    public static function getByID($id){
        $user=self::where('id',$id)
            ->find();
        return $user;
    }
    public static function getByEmail($phone){
        $user=self::where('email',$phone)
            ->find();
        return $user;
    }
    public static function getByUnionID($openid){
        $user=self::where('unionid',$openid)
            ->find();
        return $user;
    }
    public static function getByAppleID($openid){
        $user=self::where('appleid',$openid)
            ->find();
        return $user;
    }
    const ONE_CIKU=['料事如神','足智多谋','融会贯通','学贯中西','博古通今','才华横溢',
        '出类拔萃',
        '博大精深',
        '集思广益',
        '举一反三',
        '平易近人','宽宏大度','冰清玉洁','持之以恒','锲而不舍','废寝忘食', '大义凛然','临危不俱','光明磊落','不屈不挠','鞠躬尽瘁','死而后已',
        '憨态可掬','文质彬彬','风度翩翩','斗志昂扬','意气风发','威风凛凛','容光焕发','神采奕奕','相貌堂堂','落落大方',
        '悠然自得','喜笑颜开','神采奕奕','欣喜若狂','眉飞色舞', '呆若木鸡','喜出望外','垂头丧气','无动于衷','勃然大怒',
        '能说会道','巧舌如簧','能言善辩','滔滔不绝','伶牙俐齿','语惊四座','出口成章','娓娓而谈','妙语连珠','口若悬河',
    ];
    const TWO_CIKU=[
        '相云','妙玉','可卿','袭人','晴雯','麝月','秋纹','碧痕','茜雪','佳蕙','檀云','绮霞','墨雨','紫绡','茗烟','扫红','伴鹤','扫花','引泉','挑云','抱琴',
        '司棋','侍书','入画','艾官','绣橘','脆墨','小蝉','素云','碧月','春纤',
        '翠缕','文蕊'
    ];
    const INVITE_EXPLAIN=[
        0=>"1.点击分享按钮分享,好友完成登录",
        1=>"2.保存海报,分享给好友,好友扫码进入小程序完成登录",
        2=>"3.赠书页面分享按钮分享,好友完成登录",
        3=>"4.好友通过扫码或链接方式进入小程序尽快完成登录确保邀请成功",
    ];
}